package com.jade.linkong.mapper;


import com.jade.linkong.domain.EcharDataEntry;
import com.jade.linkong.domain.LkMatter;
import com.jade.linkong.domain.LkMatterProject;
import com.jade.linkong.domain.LkMatterProjectDto;
import org.apache.ibatis.annotations.Param;

import java.util.List;
 
/**
 * 事项Mapper接口
 * 
 * @author jade
 * @date 2020-07-15
 */
public interface LkMatterProjectMapper
{
    /**
     * 查询事项
     * 
     * @param id 事项ID
     * @return 事项
     */
    public LkMatterProject selectLkMatterProjectById(@Param("id") Long id,@Param("projectId") Long projectId);
 
    /**
     * 查询事项列表
     * 
     * @param lkMatterProject 事项
     * @return 事项集合
     */
    public List<LkMatterProject> selectLkMatterProjectList(LkMatterProject lkMatterProject);
 
    /**
     * 新增事项
     * 
     * @param lkMatterProject 事项
     * @return 结果
     */
    public int insertLkMatterProject(LkMatterProject lkMatterProject);
 
    /**
     * 修改事项
     * 
     * @param lkMatterProject 事项
     * @return 结果
     */
    public int updateLkMatterProject(LkMatterProject lkMatterProject);
 
    /**
     * 审核事项
     * 
     * @param
     * @return 结果2
     */
    public int updateStatus(@Param("status") String status,@Param("statusRemark") String statusRemark,@Param("id") Long id);
 
    /**
     * 删除事项
     * 
     * @param id 事项ID
     * @return 结果
     */
    public int deleteLkMatterProjectById(Long id);
 
    /**
     * 批量删除事项
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    public int deleteLkMatterProjectByIds(String[] ids);
 
    /**
     * 查询亮灯事项列表
     * @param lmp
     * @return
     */
    public List<LkMatterProject> getLightLkMatterProject(LkMatterProject lmp);
    /**
     * 查询亮灯事项列表
     * 去重-保留红灯
     * @param lmp
     * @return
     */
    public List<LkMatterProject> getDistinctLightLkMatterProject(
            LkMatterProject lmp);
 
 
    /***
     *  批量操作
     * @Author wupujian
     * @Description
     * @Date  2020/7/18
     * @Param [list]
     * @return int
     **/
    int saveBatch(List<LkMatterProject> list);
 
    int selectCountByProjectId(int projectId);
 
    List<LkMatter> selectListByProjectId(@Param("userId")int userId,@Param("projectId")int projectId,@Param("mainOrg")Long mainOrg,@Param("acceptingState")int acceptingState);
    List<LkMatter> selectListByProjectId2(@Param("userId")int userId,@Param("projectId")int projectId,@Param("mainOrg")Long mainOrg,@Param("acceptingState")int acceptingState);

    int deleteByIdsAndProjectId(@Param("array") String[] array,@Param("projectId") String projectId);

    int getCount(LkMatterProject lkMatterProject);
    int getLightCount(LkMatterProject lkMatterProject);

    List<EcharDataEntry> selectEcharData();

    List<LkMatterProject> getIndexTableData(LkMatterProject lmp);

    List<LkMatterProject> getMoreList(LkMatterProject lmp);

    EcharDataEntry selectLightCountByProject(long projectId);
    /**
     * 修改亮灯状态
     * @param matterProject
     * @return
     */
    int updateLightStatus(LkMatterProject matterProject);

    List<LkMatterProject> selectLightGroupByOrg(LkMatterProject matterProject);

    /**
     * 查询部门事项信息
     * @return
     */
    List<LkMatterProject> selectListBydept();

    /**
     * 根据负责单位修改事项授受状态
     * @param deptId
     * @return
     */
    public int updateAcceptingState(Long deptId);

    List<LkMatterProjectDto> findListByProjectId2(long projectId);

}
